package com.kgcx.price.listener;

import com.kgcx.price.utils.MqttClientUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @author 吴刚林
 * @date 2017/11/26
 */
@Component
public class ApplicationPriceStartUp implements ApplicationRunner
{
    @Autowired
    private MqttClientUtil mqttClient;

    @Override
    public void run(ApplicationArguments args) throws Exception
    {
        int[] qos  = {1};
        String[] topic1 = {"mileageRecordUpload/#"};
        mqttClient.getMqttMessage(qos, topic1);
    }
}
